#include "mainwindow.h"

#include <QDialog>
//#include <QPainter>
#include <QLabel>
#include <QMovie>
#include <QProgressBar>
#include <QPushButton>
#include <QDesktopWidget>
#include <QApplication>
#include <QRect>
//#include <QSize>
//#include <QDockWidget>
//#include <QTextEdit>

#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent), ui(new Ui::MainWindow) {
  ui->setupUi(this);

  QDesktopWidget* desktopWidget = QApplication::desktop();
  //获取设备屏幕大小
  QRect screenRect = desktopWidget->screenGeometry();
  int screenX = screenRect.width();          //桌面宽
  int screenY = screenRect.height();         //桌面长

  // setWindowTitle("长江计算机保密检查系统");   //主窗口标题
  setWindowTitle("   ");                     //主窗口标题
  setFixedSize(screenX*7/15, screenY*4/5);   //主窗口大小
  move(screenX*4/15, screenY/15);
  int mainX = screenX*7/15;                  //主窗口宽
  int mainY = screenY*4/5;                   //主窗口长

//  QDockWidget *dock = new QDockWidget(this);
//  addDockWidget(Qt::RightDockWidgetArea, dock);
//  QTextEdit *textEdit1= new QTextEdit(this);
//  dock->setWidget(textEdit1);

  //主窗口上半部分颜色1
  QWidget *mainwdw1 = new QWidget(this);
  mainwdw1->setParent(this);
  mainwdw1->setGeometry(0, 0, mainX, mainY*5/13);
  mainwdw1->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw1->show();

  //主窗口分界部分颜色2
  QWidget *mainwdw2 = new QWidget(this);
  mainwdw2->setParent(this);
  mainwdw2->setGeometry(0, mainY*5/13, mainX, mainY*5/12);
  mainwdw2->setStyleSheet("background-color:rgb(45,45,45)");
  mainwdw2->show();

  //主窗口下半部分颜色3
  QWidget *mainwdw3 = new QWidget(this);
  mainwdw3->setParent(this);
  mainwdw3->setGeometry(0, mainY*5/12, mainX, mainY);
  mainwdw3->setStyleSheet("background-color:rgb(40,40,40)");
  mainwdw3->show();

  // logo
  QPushButton *btnlogo = new QPushButton;
  btnlogo->setParent(this);
  btnlogo->setFixedSize(mainX*280/700, mainX*280/700);
  btnlogo->move(mainX*50/700, 0);
  btnlogo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/logo.png)}"});

  //欢迎字01
  QPushButton *btn01 = new QPushButton;
  btn01->setParent(this);
  btn01->setFixedSize(mainX*300/700, mainY*80/800);
  btn01->move(mainX*380/700, mainY*40/800);
  btn01->setText("保密千日，不松一时");
  btn01->setStyleSheet(
      QString{"QPushButton{font-size:25px;color:rgb(240,240,240);border:0px;"
              "background:none}"});  // font-family:\"KaiTi\";

  //欢迎字02
  QPushButton *btn02 = new QPushButton;
  btn02->setParent(this);
  btn02->move(mainX*430/700, mainY*80/800);
  btn02->setFixedSize(mainX*200/700, mainY*80/800);
  btn02->setText("欢迎使用 YUCC Inspector");  // Yangtze University Computer
                                              // Confidentiality Inspector
  btn02->setStyleSheet(QString(
      "QPushButton{color:rgb(190,190,190);border:0px;background:none}"));

  //开始检测按钮00
  QPushButton *btn00 = new QPushButton;
  btn00->setParent(this);
  btn00->setFixedSize(mainX*160/700, mainY*80/800);
  btn00->move(mainX*450/700, mainY*160/800);
  btn00->setText("开始检查！");
  btn00->setStyleSheet(
      QString("QPushButton{font-size:25px;"
              "background-color:rgb(150,230,150);"
              "border:8px ridge #99ff99;"
              "border-top-left-radius:16px;"
              "border-top-right-radius:16px;"
              "border-bottom-left-radius:16px;"
              "border-bottom-right-radius:16px}"
              "QPushButton:hover{font-size:23px;"
              "background-color:rgb(160,245,160);"
              "border:8px groove #99ff99;"
              "border-top-left-radius:16px;"
              "border-top-right-radius:16px;"
              "border-bottom-left-radius:16px;"
              "border-bottom-right-radius:16px}"));

  //常规检查按钮1
  QPushButton *btn1 = new QPushButton;
  btn1->setText("常规检查");                          //按钮文本
  btn1->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn1->setParent(this);
  btn1->move(mainX*115/700, mainY*335/800);         //按钮位置
  btn1->setStyleSheet(
      "QPushButton{border-image:none;color:lightGray;background:none;font-"
      "size:23px;border:0px}");

  //常规检查图片11
  QPushButton *btn11 = new QPushButton;
  btn11->setParent(this);
  // btn11->setStyleSheet("border-image:url(:/new/prefix1/FloderClose.png)");
  btn11->setFixedSize(mainX*50/700, mainX*50/700);
  btn11->move(mainX*60/700, mainY*345/800);
  btn11->setStyleSheet(
      QString{"QPushButton:hover{border-image:url(:/new/prefix1/res/FileOpen.png)}"
              "QPushButton{border-image:url(:/new/prefix1/res/FileClose.png)}"});

  //安全检查按钮2
  QPushButton *btn2 = new QPushButton;
  btn2->setText("安全检查");                         //按钮文本
  btn2->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn2->setParent(this);
  btn2->move(mainX*465/700, mainY*335/800);         //按钮位置
  btn2->setStyleSheet(
      "QPushButton{border-image:none;color:lightGray;background:none;font-"
      "size:23px;border:0px}");

  //安全检查图片22
  QPushButton *btn22 = new QPushButton;
  btn22->setParent(this);
  // btn22->setStyleSheet("border-image:url(:/new/prefix1/SafeClose.png)");
  btn22->setFixedSize(mainX*50/700, mainX*50/700);
  btn22->move(mainX*415/700, mainY*345/800);
  btn22->setStyleSheet(
      QString{"QPushButton:hover{border-image:url(:/new/prefix1/res/SafeOpen.png)}"
              "QPushButton{border-image:url(:/new/prefix1/res/SafeClose.png)}"});

  //文件检查按钮3
  QPushButton *btn3 = new QPushButton;
  btn3->setText("文件检查");                         //按钮文本
  btn3->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn3->setParent(this);
  btn3->move(mainX*115/700, mainY*450/800);         //按钮位置115,450
  btn3->setStyleSheet(
      "QPushButton{border-image:none;color:lightGray;background:none;font-"
      "size:23px;border:0px}");

  //文件检查图片33
  QPushButton *btn33 = new QPushButton;
  btn33->setParent(this);
  // btn33->setStyleSheet("border-image:url(:/new/prefix1/TextClose.png)");
  btn33->setFixedSize(mainX*50/700, mainX*50/700);
  btn33->move(mainX*60/700, mainY*460/800);
  btn33->setStyleSheet(
      QString{"QPushButton:hover{border-image:url(:/new/prefix1/res/TextOpen.png)}"
              "QPushButton{border-image:url(:/new/prefix1/res/TextClose.png)}"});

  //深度检查按钮4
  QPushButton *btn4 = new QPushButton;
  btn4->setText("深度检查");    //按钮文本
  btn4->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn4->setParent(this);
  btn4->move(mainX*465/700, mainY*450/800);  //按钮位置465,450
  btn4->setStyleSheet(
      "QPushButton{border-image:none;color: lightGray;background:none;font-"
      "size:23px;border:0px}");

  //深度检查图片43
  QPushButton *btn43 = new QPushButton;
  btn43->setParent(this);
  // btn43->setStyleSheet("border-image:url(:/new/prefix1/TextClose.png)");
  btn43->setFixedSize(mainX*50/700, mainX*50/700);
  btn43->move(mainX*410/700, mainY*460/800);
  btn43->setStyleSheet(
      QString{"QPushButton:hover{border-image:url(:/new/prefix1/res/TextOpen.png)}"
              "QPushButton{border-image:url(:/new/prefix1/res/TextClose.png)}"});

  //虚拟机检查按钮5
  QPushButton *btn5 = new QPushButton;
  btn5->setText("虚拟机检查");    //按钮文本
  btn5->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn5->setParent(this);
  btn5->move(mainX*115/700, mainY*565/800);  //按钮位置465,450
  btn5->setStyleSheet(
      "QPushButton{border-image:none;color: lightGray;background:none;font-"
      "size:23px;border:0px}");

  //邮箱检查按钮6
  QPushButton *btn6 = new QPushButton;
  btn6->setText("邮箱检查");    //按钮文本
  btn6->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn6->setParent(this);
  btn6->move(mainX*465/700, mainY*565/800);  //按钮位置465,450
  btn6->setStyleSheet(
      "QPushButton{border-image:none;color: lightGray;background:none;font-"
      "size:23px;border:0px}");

  //硬件检查按钮7
  QPushButton *btn7 = new QPushButton;
  btn7->setText("深度检查");    //按钮文本
  btn7->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn7->setParent(this);
  btn7->move(mainX*115/700, mainY*680/800);  //按钮位置465,450
  btn7->setStyleSheet(
      "QPushButton{border-image:none;color: lightGray;background:none;font-"
      "size:23px;border:0px}");

  //检查报告按钮8
  QPushButton *btn8 = new QPushButton;
  btn8->setText("检查报告");    //按钮文本
  btn8->setFixedSize(mainX*120/700, mainY*80/800);  //按钮大小
  btn8->setParent(this);
  btn8->move(mainX*465/700, mainY*680/800);  //按钮位置465,450
  btn8->setStyleSheet(
      "QPushButton{border-image:none;color: lightGray;background:none;font-"
      "size:23px;border:0px}");

  //-------------------------------------------------------------------------------------------------------
  //“开始检查”窗口01（默认为常规检查）
  QDialog *dlg01 = new QDialog;
  dlg01->setFixedSize(mainX, mainY);
  dlg01->move(mainX*600/700, mainY*82/800);
  connect(btn00, &QPushButton::clicked, dlg01, &QDialog::show);
  connect(btn00, &QPushButton::clicked, this, &QMainWindow::close);

  //“开始检查”窗口01上半部分颜色0101
  QWidget *mainwdw0101 = new QWidget;
  mainwdw0101->setParent(dlg01);
  mainwdw0101->setGeometry(0, 0, mainX, mainY*200/800);
  mainwdw0101->setStyleSheet("background-color:rgb(40,40,40)");
  mainwdw0101->show();

  //“开始检查”窗口01分界部分颜色0102
  QWidget *mainwdw0102 = new QWidget;
  mainwdw0102->setParent(dlg01);
  mainwdw0102->setGeometry(0, mainY*200/800, mainX, mainY*220/800);
  mainwdw0102->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw0102->show();

  //“开始检查”窗口01下半部分颜色0103
  QWidget *mainwdw0103 = new QWidget;
  mainwdw0103->setParent(dlg01);
  mainwdw0103->setGeometry(0, mainY*220/800, mainX, mainY*600/800);
  mainwdw0103->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw0103->show();

  //进度上提示字符
  QPushButton *btn0101 = new QPushButton;
  btn0101->setParent(dlg01);
  btn0101->setFixedSize(mainX*400/700, mainY*80/800);
  btn0101->setText("检查出65535个项泽龙！建议立即清理");
  btn0101->move(mainX*150/700, mainY*50/800);
  btn0101->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度条
  QProgressBar *qpb = new QProgressBar;
  qpb->setParent(dlg01);
  qpb->move(mainX*175/700, mainY*120/800);
  qpb->setMaximum(100);
  qpb->setMinimum(0);
  qpb->setValue(90);
  //QString swidth = (QString)(mainX*400/700);
  //int swidth = mainX*400/700;
  qpb->setStyleSheet(
      QString{"QProgressBar{border:1px solid "
              "grey;border-radius:3px;background-color:transparent;text-align:"
              "center;qproperty-textVisible:false;height:20px;width:400px}"
              "QProgressBar::chunk{background-color:qlineargradient(x1:0,y1:0,"
              "x2:1,y2:0,stop:0 #B3E59E,stop:1.0 #83E800)}"});

  //进度下提示字符0103
  QPushButton *btn0103 = new QPushButton;
  btn0103->setParent(dlg01);
  btn0103->setFixedSize(mainX*400/700, mainY*80/800);
  btn0103->setText("正在检测：/Users/linmuyu/Desktop/123.txt");
  btn0103->move(mainX*105/700, mainY*120/800);
  btn0103->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn01logo = new QPushButton;
  btn01logo->setParent(dlg01);
  btn01logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn01logo->move(mainX*30/700, mainY*30/800);
  btn01logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // LOADING
  QLabel *qlb01loading = new QLabel;
  QMovie *mov01loading = new QMovie(":/new/prefix1/res/loading01.gif");
  qlb01loading->setFixedSize(mainX*100/700, mainY*100/800);
  QSize mov01load(qlb01loading->width(), qlb01loading->height());
  mov01loading->setScaledSize(mov01load);
  mov01loading->setParent(dlg01);
  qlb01loading->setParent(dlg01);
  qlb01loading->setMovie(mov01loading);
  qlb01loading->move(mainX*30/700, mainY*220/800);
  mov01loading->start();

  //返回主窗口0102
  QPushButton *btn0102 = new QPushButton;
  btn0102->setParent(dlg01);
  btn0102->move(mainX*600/700, mainY*111/800);
  btn0102->setText("返回");
  btn0102->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn0102, &QPushButton::clicked, dlg01, &QDialog::close);
  connect(btn0102, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“常规检查”窗口02
  QDialog *dlg02 = new QDialog;
  dlg02->setFixedSize(mainX, mainY);
  dlg02->move(mainX*600/700, mainY*82/800);
  connect(btn1, &QPushButton::clicked, dlg02, &QDialog::show);
  connect(btn1, &QPushButton::clicked, this, &QMainWindow::close);

  //“常规检查”窗口02上半部分颜色0201
  QWidget *mainwdw0201 = new QWidget;
  mainwdw0201->setParent(dlg02);
  mainwdw0201->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw0201->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw0201->show();

  //“常规检查”窗口02分界部分颜色0202
  QWidget *mainwdw0202 = new QWidget;
  mainwdw0202->setParent(dlg02);
  mainwdw0202->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw0202->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw0202->show();

  //“常规检查”窗口02下半部分颜色0203
  QWidget *mainwdw0203 = new QWidget;
  mainwdw0203->setParent(dlg02);
  mainwdw0203->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw0203->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw0203->show();

  //进度上提示字符0201
  QPushButton *btn0201 = new QPushButton;
  btn0201->setParent(dlg02);
  btn0201->setFixedSize(mainX*400/700, mainY*80/800);
  btn0201->setText("常规检查已完成，用时一分三十秒");
  btn0201->move(mainX*150/700, mainY*10/800);
  btn0201->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0202
  QPushButton *btn0202 = new QPushButton;
  btn0202->setParent(dlg02);
  btn0202->setFixedSize(mainX*400/700, mainY*80/800);
  btn0202->setText("共检测文件65535项");
  btn0202->move(mainX*145/700, mainY*75/800);
  btn0202->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn02logo = new QPushButton;
  btn02logo->setParent(dlg02);
  btn02logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn02logo->move(mainX*30/700, mainY*10/800);
  btn02logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb02loading = new QLabel;
  QMovie *mov02loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb02loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov02load(qlb02loading->width(), qlb02loading->height());
  mov02loading->setScaledSize(mov02load);
  mov02loading->setParent(dlg02);
  qlb02loading->setParent(dlg02);
  qlb02loading->setMovie(mov02loading);
  qlb02loading->move(mainX*195/700, mainY*75/800);
  mov02loading->start();

  //返回主窗口0203
  QPushButton *btn0203 = new QPushButton;
  btn0203->setParent(dlg02);
  btn0203->move(mainX*600/700, mainY*71/800);
  btn0203->setText("返回");
  btn0203->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn0203, &QPushButton::clicked, dlg02, &QDialog::close);
  connect(btn0203, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“安全检查”窗口03
  QDialog *dlg03 = new QDialog;
  dlg03->setFixedSize(mainX, mainY);
  dlg03->move(mainX*600/700, mainY*82/800);
  connect(btn2, &QPushButton::clicked, dlg03, &QDialog::show);
  connect(btn2, &QPushButton::clicked, this, &QMainWindow::close);

  //“安全检查”窗口03上半部分颜色0301
  QWidget *mainwdw0301 = new QWidget;
  mainwdw0301->setParent(dlg03);
  mainwdw0301->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw0301->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw0301->show();

  //“安全检查”窗口03分界部分颜色0302
  QWidget *mainwdw0302 = new QWidget;
  mainwdw0302->setParent(dlg03);
  mainwdw0302->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw0302->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw0302->show();

  //“安全检查”窗口03下半部分颜色0103
  QWidget *mainwdw0303 = new QWidget;
  mainwdw0303->setParent(dlg03);
  mainwdw0303->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw0303->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw0303->show();

  //进度上提示字符0301
  QPushButton *btn0301 = new QPushButton;
  btn0301->setParent(dlg03);
  btn0301->setFixedSize(mainX*400/700, mainY*80/800);
  btn0301->setText("安全检查已完成，用时一分三十秒");
  btn0301->move(mainX*150/700, mainY*10/800);
  btn0301->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0302
  QPushButton *btn0302 = new QPushButton;
  btn0302->setParent(dlg03);
  btn0302->setFixedSize(mainX*400/700, mainY*80/800);
  btn0302->setText("共检测文件65535项");
  btn0302->move(mainX*145/700, mainY*75/800);
  btn0302->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn03logo = new QPushButton;
  btn03logo->setParent(dlg03);
  btn03logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn03logo->move(mainX*30/700, mainY*10/800);
  btn03logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb03loading = new QLabel;
  QMovie *mov03loading = new QMovie(":/new/prefix/res/succeed.gif");
  qlb03loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov03load(qlb03loading->width(), qlb03loading->height());
  mov03loading->setScaledSize(mov03load);
  mov03loading->setParent(dlg03);
  qlb03loading->setParent(dlg03);
  qlb03loading->setMovie(mov03loading);
  qlb03loading->move(mainX*195/700, mainY*75/800);
  mov03loading->start();

  //返回主窗口0303
  QPushButton *btn0303 = new QPushButton;
  btn0303->setParent(dlg03);
  btn0303->move(mainX*600/700, mainY*71/800);
  btn0303->setText("返回");
  btn0303->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn0303, &QPushButton::clicked, dlg03, &QDialog::close);
  connect(btn0303, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“文件检查”窗口04
  QDialog *dlg04 = new QDialog;
  dlg04->setFixedSize(mainX, mainY);
  dlg04->move(mainX*600/700, mainY*82/800);
  connect(btn3, &QPushButton::clicked, dlg04, &QDialog::show);
  connect(btn3, &QPushButton::clicked, this, &QMainWindow::close);

  //“文件检查”窗口04上半部分颜色0401
  QWidget *mainwdw0401 = new QWidget;
  mainwdw0401->setParent(dlg04);
  mainwdw0401->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw0401->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw0401->show();

  //“文件检查”窗口04分界部分颜色0402
  QWidget *mainwdw0402 = new QWidget;
  mainwdw0402->setParent(dlg04);
  mainwdw0402->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw0402->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw0402->show();

  //“文件检查”窗口04下半部分颜色0403
  QWidget *mainwdw0403 = new QWidget;
  mainwdw0403->setParent(dlg04);
  mainwdw0403->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw0403->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw0403->show();

  //进度上提示字符0401
  QPushButton *btn0401 = new QPushButton;
  btn0401->setParent(dlg04);
  btn0401->setFixedSize(mainX*400/700, mainY*80/800);
  btn0401->setText("文件检查已完成，用时一分三十秒");
  btn0401->move(mainX*150/700, mainY*10/800);
  btn0401->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0402
  QPushButton *btn0402 = new QPushButton;
  btn0402->setParent(dlg04);
  btn0402->setFixedSize(mainX*400/700, mainY*80/800);
  btn0402->setText("共检测文件65535项");
  btn0402->move(mainX*145/700, mainY*75/800);
  btn0402->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn04logo = new QPushButton;
  btn04logo->setParent(dlg04);
  btn04logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn04logo->move(mainX*30/700, mainY*10/800);
  btn04logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb04loading = new QLabel;
  QMovie *mov04loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb04loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov04load(qlb04loading->width(), qlb04loading->height());
  mov04loading->setScaledSize(mov04load);
  mov04loading->setParent(dlg04);
  qlb04loading->setParent(dlg04);
  qlb04loading->setMovie(mov04loading);
  qlb04loading->move(mainX*195/700, mainY*75/800);
  mov04loading->start();

  //返回主窗口0403
  QPushButton *btn0403 = new QPushButton;
  btn0403->setParent(dlg04);
  btn0403->move(mainX*600/700, mainY*71/800);
  btn0403->setText("返回");
  btn0403->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn0403, &QPushButton::clicked, dlg04, &QDialog::close);
  connect(btn0403, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“深度检查”窗口05
  QDialog *dlg05 = new QDialog;
  dlg05->setFixedSize(mainX, mainY);
  dlg05->move(mainX*600/700, mainY*82/800);
  connect(btn4, &QPushButton::clicked, dlg05, &QDialog::show);
  connect(btn4, &QPushButton::clicked, this, &QMainWindow::close);

  //“深度检查”窗口05上半部分颜色0501
  QWidget *mainwdw0501 = new QWidget;
  mainwdw0501->setParent(dlg05);
  mainwdw0501->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw0501->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw0501->show();

  //“深度检查”窗口05分界部分颜色0502
  QWidget *mainwdw0502 = new QWidget;
  mainwdw0502->setParent(dlg05);
  mainwdw0502->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw0502->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw0502->show();

  //“深度检查”窗口05下半部分颜色0503
  QWidget *mainwdw0503 = new QWidget;
  mainwdw0503->setParent(dlg05);
  mainwdw0503->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw0503->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw0503->show();

  //进度上提示字符0501
  QPushButton *btn0501 = new QPushButton;
  btn0501->setParent(dlg05);
  btn0501->setFixedSize(mainX*400/700, mainY*80/800);
  btn0501->setText("深度检查已完成，用时一分三十秒");
  btn0501->move(mainX*150/700, mainY*10/800);
  btn0501->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符05025
  QPushButton *btn0502 = new QPushButton;
  btn0502->setParent(dlg05);
  btn0502->setFixedSize(mainX*400/700, mainY*80/800);
  btn0502->setText("共检测文件65535项");
  btn0502->move(mainX*145/700, mainY*75/800);
  btn0502->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn05logo = new QPushButton;
  btn05logo->setParent(dlg05);
  btn05logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn05logo->move(mainX*30/700, mainY*10/800);
  btn05logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb05loading = new QLabel;
  QMovie *mov05loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb05loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov05load(qlb05loading->width(), qlb05loading->height());
  mov05loading->setScaledSize(mov05load);
  mov05loading->setParent(dlg05);
  qlb05loading->setParent(dlg05);
  qlb05loading->setMovie(mov05loading);
  qlb05loading->move(mainX*195/700, mainY*75/800);
  mov05loading->start();

  //返回主窗口0503
  QPushButton *btn0503 = new QPushButton;
  btn0503->setParent(dlg05);
  btn0503->move(mainX*600/700, mainY*71/800);
  btn0503->setText("返回");
  btn0503->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn0503, &QPushButton::clicked, dlg05, &QDialog::close);
  connect(btn0503, &QPushButton::clicked, this, &QMainWindow::show);
  //-------------------------------------------------------------------------------------------------------
  //“虚拟机检查”窗口06
  QDialog *dlg06 = new QDialog;
  dlg06->setFixedSize(mainX, mainY);
  dlg06->move(mainX*600/700, mainY*82/800);
  connect(btn5, &QPushButton::clicked, dlg06, &QDialog::show);
  connect(btn5, &QPushButton::clicked, this, &QMainWindow::close);

  //“虚拟机检查”窗口06上半部分颜色0601
  QWidget *mainwdw0601 = new QWidget;
  mainwdw0601->setParent(dlg06);
  mainwdw0601->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw0601->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw0601->show();

  //“虚拟机检查”窗口06分界部分颜色0602
  QWidget *mainwdw0602 = new QWidget;
  mainwdw0602->setParent(dlg06);
  mainwdw0602->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw0602->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw0602->show();

  //“虚拟机检查”窗口06下半部分颜色0603
  QWidget *mainwdw0603 = new QWidget;
  mainwdw0603->setParent(dlg06);
  mainwdw0603->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw0603->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw0603->show();

  //进度上提示字符0601
  QPushButton *btn0601 = new QPushButton;
  btn0601->setParent(dlg06);
  btn0601->setFixedSize(mainX*400/700, mainY*80/800);
  btn0601->setText("虚拟机检查已完成，用时一分三十秒");
  btn0601->move(mainX*150/700, mainY*10/800);
  btn0601->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0602
  QPushButton *btn0602 = new QPushButton;
  btn0602->setParent(dlg06);
  btn0602->setFixedSize(mainX*400/700, mainY*80/800);
  btn0602->setText("共检测文件65535项");
  btn0602->move(mainX*145/700, mainY*75/800);
  btn0602->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn06logo = new QPushButton;
  btn06logo->setParent(dlg06);
  btn06logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn06logo->move(mainX*30/700, mainY*10/800);
  btn06logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb06loading = new QLabel;
  QMovie *mov06loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb06loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov06load(qlb06loading->width(), qlb06loading->height());
  mov06loading->setScaledSize(mov06load);
  mov06loading->setParent(dlg06);
  qlb06loading->setParent(dlg06);
  qlb06loading->setMovie(mov06loading);
  qlb06loading->move(mainX*195/700, mainY*75/800);
  mov06loading->start();

  //返回主窗口0603
  QPushButton *btn0603 = new QPushButton;
  btn0603->setParent(dlg06);
  btn0603->move(mainX*600/700, mainY*71/800);
  btn0603->setText("返回");
  btn0603->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn0603, &QPushButton::clicked, dlg06, &QDialog::close);
  connect(btn0603, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“邮箱检查”窗口07
  QDialog *dlg07 = new QDialog;
  dlg07->setFixedSize(mainX, mainY);
  dlg07->move(mainX*600/700, mainY*82/800);
  connect(btn6, &QPushButton::clicked, dlg07, &QDialog::show);
  connect(btn6, &QPushButton::clicked, this, &QMainWindow::close);

  //“邮箱检查”窗口07上半部分颜色0701
  QWidget *mainwdw0701 = new QWidget;
  mainwdw0701->setParent(dlg07);
  mainwdw0701->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw0701->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw0701->show();

  //“邮箱检查”窗口07分界部分颜色0702
  QWidget *mainwdw0702 = new QWidget;
  mainwdw0702->setParent(dlg07);
  mainwdw0702->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw0702->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw0702->show();

  //“邮箱检查”窗口07下半部分颜色0703
  QWidget *mainwdw0703 = new QWidget;
  mainwdw0703->setParent(dlg07);
  mainwdw0703->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw0703->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw0703->show();

  //进度上提示字符0701
  QPushButton *btn0701 = new QPushButton;
  btn0701->setParent(dlg07);
  btn0701->setFixedSize(mainX*400/700, mainY*80/800);
  btn0701->setText("邮箱检查已完成，用时一分三十秒");
  btn0701->move(mainX*150/700, mainY*10/800);
  btn0701->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0702
  QPushButton *btn0702 = new QPushButton;
  btn0702->setParent(dlg07);
  btn0702->setFixedSize(mainX*400/700, mainY*80/800);
  btn0702->setText("共检测文件65535项");
  btn0702->move(mainX*145/700, mainY*75/800);
  btn0702->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn07logo = new QPushButton;
  btn07logo->setParent(dlg07);
  btn07logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn07logo->move(mainX*30/700, mainY*10/800);
  btn07logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb07loading = new QLabel;
  QMovie *mov07loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb07loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov07load(qlb07loading->width(), qlb07loading->height());
  mov07loading->setScaledSize(mov07load);
  mov07loading->setParent(dlg07);
  qlb07loading->setParent(dlg07);
  qlb07loading->setMovie(mov07loading);
  qlb07loading->move(mainX*195/700, mainY*75/800);
  mov07loading->start();

  //返回主窗口0703
  QPushButton *btn0703 = new QPushButton;
  btn0703->setParent(dlg07);
  btn0703->move(mainX*600/700, mainY*71/800);
  btn0703->setText("返回");
  btn0703->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn0703, &QPushButton::clicked, dlg07, &QDialog::close);
  connect(btn0703, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“硬件检查”窗口08
  QDialog *dlg08 = new QDialog;
  dlg08->setFixedSize(mainX, mainY);
  dlg08->move(mainX*600/700, mainY*82/800);
  connect(btn7, &QPushButton::clicked, dlg08, &QDialog::show);
  connect(btn7, &QPushButton::clicked, this, &QMainWindow::close);

  //“硬件检查”窗口08上半部分颜色0801
  QWidget *mainwdw0801 = new QWidget;
  mainwdw0801->setParent(dlg08);
  mainwdw0801->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw0801->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw0801->show();

  //“硬件检查”窗口08分界部分颜色0802
  QWidget *mainwdw0802 = new QWidget;
  mainwdw0802->setParent(dlg08);
  mainwdw0802->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw0802->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw0802->show();

  //“硬件检查”窗口08下半部分颜色0803
  QWidget *mainwdw0803 = new QWidget;
  mainwdw0803->setParent(dlg08);
  mainwdw0803->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw0803->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw0803->show();

  //进度上提示字符0801
  QPushButton *btn0801 = new QPushButton;
  btn0801->setParent(dlg08);
  btn0801->setFixedSize(mainX*400/700, mainY*80/800);
  btn0801->setText("硬件检查已完成，用时一分三十秒");
  btn0801->move(mainX*150/700, mainY*10/800);
  btn0801->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0802
  QPushButton *btn0802 = new QPushButton;
  btn0802->setParent(dlg08);
  btn0802->setFixedSize(mainX*400/700, mainY*80/800);
  btn0802->setText("共检测文件65535项");
  btn0802->move(mainX*145/700, mainY*75/800);
  btn0802->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn08logo = new QPushButton;
  btn08logo->setParent(dlg08);
  btn08logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn08logo->move(mainX*30/700, mainY*10/800);
  btn08logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb08loading = new QLabel;
  QMovie *mov08loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb08loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov08load(qlb08loading->width(), qlb08loading->height());
  mov08loading->setScaledSize(mov08load);
  mov08loading->setParent(dlg08);
  qlb08loading->setParent(dlg08);
  qlb08loading->setMovie(mov08loading);
  qlb08loading->move(mainX*195/700, mainY*75/800);
  mov08loading->start();

  //返回主窗口0803
  QPushButton *btn0803 = new QPushButton;
  btn0803->setParent(dlg08);
  btn0803->move(mainX*600/700, mainY*71/800);
  btn0803->setText("返回");
  btn0803->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn0803, &QPushButton::clicked, dlg08, &QDialog::close);
  connect(btn0803, &QPushButton::clicked, this, &QMainWindow::show);

  //-------------------------------------------------------------------------------------------------------
  //“检查报告”窗口09
  QDialog *dlg09 = new QDialog;
  dlg09->setFixedSize(mainX, mainY);
  dlg09->move(mainX*600/700, mainY*82/800);
  connect(btn8, &QPushButton::clicked, dlg09, &QDialog::show);
  connect(btn8, &QPushButton::clicked, this, &QMainWindow::close);

  //“检查报告”窗口09上半部分颜色0901
  QWidget *mainwdw0901 = new QWidget;
  mainwdw0901->setParent(dlg09);
  mainwdw0901->setGeometry(0, 0, mainX, mainY*160/800);
  mainwdw0901->setStyleSheet("background-color:rgb(52,55,59)");
  mainwdw0901->show();

  //“检查报告”窗口09分界部分颜色0902
  QWidget *mainwdw0902 = new QWidget;
  mainwdw0902->setParent(dlg09);
  mainwdw0902->setGeometry(0, 160, mainX, mainY*170/800);
  mainwdw0902->setStyleSheet("background-color:rgb(51,52,54)");
  mainwdw0902->show();

  //“检查报告”窗口09下半部分颜色0903
  QWidget *mainwdw0903 = new QWidget;
  mainwdw0903->setParent(dlg09);
  mainwdw0903->setGeometry(0, 170, mainX, mainY*600/800);
  mainwdw0903->setStyleSheet("background-color:rgb(50,50,50)");
  mainwdw0903->show();

  //进度上提示字符0901
  QPushButton *btn0901 = new QPushButton;
  btn0901->setParent(dlg09);
  btn0901->setFixedSize(mainX*400/700, mainY*80/800);
  btn0901->setText("检查报告已完成，用时一分三十秒");
  btn0901->move(mainX*150/700, mainY*10/800);
  btn0901->setStyleSheet(
      QString{"QPushButton{border:0px;background:none;font-size:20px}"});

  //进度下提示字符0902
  QPushButton *btn0902 = new QPushButton;
  btn0902->setParent(dlg09);
  btn0902->setFixedSize(mainX*400/700, mainY*80/800);
  btn0902->setText("共检测文件65535项");
  btn0902->move(mainX*145/700, mainY*75/800);
  btn0902->setStyleSheet(QString{
      "QPushButton{border:0px;background:none;font-size:13px;color:azure}"});

  //进度条logo
  QPushButton *btn09logo = new QPushButton;
  btn09logo->setParent(dlg09);
  btn09logo->setFixedSize(mainX*120/700, mainX*120/700);
  btn09logo->move(mainX*30/700, mainY*10/800);
  btn09logo->setStyleSheet(
      QString{"QPushButton{border-image:url(:/new/prefix1/res/01logo.png)}"});

  // SUCCEED
  QLabel *qlb09loading = new QLabel;
  QMovie *mov09loading = new QMovie(":/new/prefix1/res/succeed.gif");
  qlb09loading->setFixedSize(mainX*80/700, mainX*80/700);
  QSize mov09load(qlb09loading->width(), qlb09loading->height());
  mov09loading->setScaledSize(mov09load);
  mov09loading->setParent(dlg09);
  qlb09loading->setParent(dlg09);
  qlb09loading->setMovie(mov09loading);
  qlb09loading->move(mainX*195/700, mainY*75/800);
  mov09loading->start();

  //返回主窗口0903
  QPushButton *btn0903 = new QPushButton;
  btn0903->setParent(dlg09);
  btn0903->move(mainX*600/700, mainY*71/800);
  btn0903->setText("返回");
  btn0903->setStyleSheet(
      QString{"QPushButton{color:lightGray;font-size:18px}"});
  connect(btn0903, &QPushButton::clicked, dlg09, &QDialog::close);
  connect(btn0903, &QPushButton::clicked, this, &QMainWindow::show);

}

MainWindow::~MainWindow() { delete ui; }
